package com.huanzhidadi.singleweb.fastjson.filter;

import com.alibaba.fastjson2.filter.ValueFilter;

import java.util.Objects;

/**
 * 字符串null和null转为""
 */
public class NullFilter implements ValueFilter {
    @Override
    public Object apply(Object object, String name, Object value) {
        if (Objects.isNull(value) || "null".equals(value)) {
            value = "";
        }
        return value;
    }
}
